<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>05.form_fields | KnockOut</title>
  <script src="../assets/knockout-3.5.1.js"></script>
</head>
<body>

  <p>Login name: <input data-bind="textInput: userName" /></p>
  <p>Password: <input type="password" data-bind="textInput: userPassword" /></p>
  
  ViewModel:
  <pre data-bind="text: ko.toJSON($root, null, 2)"></pre>
  
  <script type="text/javascript">
    ko.applyBindings({
      userName: ko.observable(""),
      userPassword: ko.observable("abc")
    });
  </script>

</body>
</html>